import { lazy } from "react";

const Home=lazy(()=>import("../pages/Home"))
const Layout=lazy(()=>import("../pages/Layout"))
const List=lazy(()=>import("../pages/List"))
const My=lazy(()=>import("../pages/My"))
const Deitle=lazy(()=>import("../pages/Deitle"))
const Text=lazy(()=>import("../pages/Text"))

export const handleHomes=[
    {
        path:"/",
        element:<Home></Home>,
        title:"首页"
    },
    {
        path:"/text",
        element:<Text></Text>,
        title:"消息"
    },
    {
        path:"/my",
        element:<My></My>,
        title:"我的"
    }
]

export const routes=[
    {
        path:"/",
        element:<Layout></Layout>,
        children:handleHomes
    },
    {
        path:"/deitle/:id",
        element:<Deitle></Deitle>
    },
    {
        path:"/list",
        element:<List></List>
    }
]